set -e

echo "set localtime"
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc

echo "set hsotname"
echo "tts-pc" > /etc/hostname


echo "install networkmanager"
pacman -S networkmanager
systemctl enable NetworkManager.service


echo "install ucode"
pacman -S intel-ucode

echo "install boot grub"
pacman -S grub efibootmgr

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

pacman -S vim noto-fonts-cjk
echo "LANG=en_US.UTF-8" >/etc/locale.conf


echo "Use the following command to modify the time zone"
#echo "vim /etc/locale.gen"
#echo "locale-gen"
cp /etc/locale.gen /etc/locale.gen.bak
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
echo "zh_CN.UTF-8 UTF-8">> /etc/locale.gen

locale-gen


echo "done"



